package com.dingup.paike.util;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by wancheng on 2018/12/4.
 */
public class BigDecimalUtil {


    public static BigDecimal getClassHour(Date before, Date after) {
        long time = after.getTime() - before.getTime();
        return new BigDecimal(time)
                .divide(new BigDecimal(1000).multiply(new BigDecimal(3600)), 2, BigDecimal.ROUND_HALF_UP);
    }
}
